<?php

namespace App\Models\Webserver;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\Webserver\ShopSubCategory
 *
 * @property int $id
 * @property int $id_category
 * @property string $name
 * @property-read \App\Models\Webserver\ShopCategory $category
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Webserver\ShopSubCategory whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Webserver\ShopSubCategory whereIdCategory($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Webserver\ShopSubCategory whereName($value)
 * @mixin \Eloquent
 */
class ShopSubCategory extends Model {

    protected $table        = 'shop_sub_category';
    protected $connection   = 'webserver';
    protected $fillable     = ['name', 'id_category', 'id'];
    public $timestamps      = false;

    public function category(){
      return $this->belongsTo('App\Models\Webserver\ShopCategory', 'id_category', 'id');
    }

}
